using System;
using System.Collections.Generic;
using System.Text;

namespace Multiplicity.Reflection {
    class USHeap : SizePrefixedHeapBase<string> {

        internal const string Name = "#US";

        public USHeap(Module module, StorageHeapHeader head, long storageOffset)
            : base(module, head, storageOffset) {
        }
        protected override string ReadBlobItem(uint index, uint size) {
            int idx = Convert.ToInt32(index);
            int count = Convert.ToInt32(size);
            
            return Encoding.Unicode.GetString(Buffer, idx, count);
        }

    }
}
